package com.naton.mydemo.model.api

import com.naton.common.network.BaseResponse
import com.naton.mydemo.bean.FileUploadResult
import io.reactivex.Observable
import okhttp3.MultipartBody
import okhttp3.ResponseBody
import retrofit2.http.*


/**
 * Created by xuhao on 2017/11/16.
 * Api 接口
 */

interface FileService{
    /******************  文件相关  **********************/
    //单文件上传
    @POST("upload")
    @Multipart
    fun uploadFile(@Part parts : MultipartBody.Part, @QueryMap map :  Map<String,String>):Observable<BaseResponse<List<FileUploadResult>>>

    //    // 多文件上传
    @Multipart
    @POST("upload")
    fun uploadMutFiles(@Part parts: ArrayList<MultipartBody.Part>, @QueryMap map:  Map<String,String> ):Observable<BaseResponse<List<FileUploadResult>>>

}